<div class="productorigin">
<% new_or_existing = productorigin.new_record? ? 'new' : 'existing' %>

<% prefix = "product[#{new_or_existing}_productorigin_attributes][]" %>
<% fields_for prefix, productorigin do |productorigin_form| -%>
  <p>
   
	<%= productorigin_form.collection_select "national_id", @national, :id, :NationName, :prompt => "Country Select" %>
	<%= productorigin_form.collection_select "farm_id", @farm, :id, :farmName, :prompt => "Farm Select" %>
    
    <%= link_to_function "remove", "$(this).up('.productorigin').remove()"%>
  
  </p>
<%end -%>
</div>
